package simulator;

import configuration.Configuration;
import storage.Disk;
import storage.Block;

/**
 * The manager connects all clients with each other. It also forwards the block
 * read requests to the server. The responsibility of the manager varies in each
 * algorithm.
 * 
 * @author Nodirjon Siddikov
 */
public class Manager {
	// instance variables
	protected int _id;
	protected Disk _disk;
	protected Client[] _clients;

	// constructor
	public Manager(int id, Disk disk) {
		_id = id;
		_disk = disk;
		if (Configuration.detailedStats != 0) {
			System.out.println("Manager is up.");
		}
	}

	// connect the clients to the manager
	public void setClients(Client[] clients) {
		return;
	}

	// read from disk
	public Block readFromStorage(int blockID) {
		return _disk.read(blockID);
	}

	// get the manager's ID
	public int getID() {
		return _id;
	}

	// returns the overall size of the global cache
	public int getGlobalCacheSize() {
		return 0;
	}
}